﻿


<div id="list-dept">
    @Html.Action("ChildDeptPartialView")
</div>


<br />
<input type="button" value="增加单位" class="webcar-button" style="margin-left:10px;" onclick="javascript: add();" />
<input type="button" value="返回" class="webcar-button" style="margin-left:10px;" onclick="javascript: pageback();" />

<script type="text/javascript">
    var deptId = null;
    var superid = null;
    function edit(id) {
        deptId = id;
        pcModalMode.Show();
    }
    function OnBeginCallback(s, e) {
        if (deptId != null) {
            e.customArgs["id"] = deptId;
        }
        if (superid != null) {
            e.customArgs["superid"] = superid;
        }
        superid = null;
        deptId = null;
    }

    function add() {
        superid = '@Html.ViewContext.RouteData.Values["id"]';
        pcModalMode.Show();
    }
    
    function OnEndCallback(s, e) {
    }

    function pageback() {
        location.href = '@Url.Action("Dept")';
    };
</script>



@Html.DevExpress().PopupControl(
settings =>
{
    settings.Name = "pcModalMode";
    settings.CallbackRouteValues = new { Controller = "System", Action = "EditDept" };
    settings.Width = 410;
    settings.Height = 200;
    settings.InitDefaultSettings();
    
    settings.HeaderText = "部门信息编辑";
}).GetHtml()
